//
//  GoodInfoCell.m
//  com.modada.new
//
//  Created by ferver7 on 2019/4/15.
//  Copyright © 2019 ferver7. All rights reserved.
//

#import "GoodInfoCell.h"
#import "AppBaseGoodItem.h"

@implementation GoodInfoCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(void)reloadViewForModel:(id)model
{
    AppBaseGoodItem * itemModel = (AppBaseGoodItem *)model;
    if (itemModel.type.integerValue == 1) {
        self.goodStatusLabel.text = @"商家";
    }else{
        self.goodStatusLabel.text = @"专享";
    }
    self.nameLabel.text = itemModel.name;
    if (itemModel.freescope.integerValue == -1) {
        self.exInfoLabel.text = @"免费配送";
    }else{
        self.exInfoLabel.text = [NSString stringWithFormat:@"%@公里内免费配送",itemModel.freescope];
    }
    self.sellerLabel.text = [NSString stringWithFormat:@"已售%@",itemModel.salesVolume];
    self.kucunLabel.text = [NSString stringWithFormat:@"库存%@",itemModel.totalStock];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
